﻿using System;
using System.Collections.Generic;
using ExpenseSystem.Common.BaseModel;

namespace ExpenseSystem.Model
{
    [TableName("SAM_QUOTE")]

    public class QuoteModel : NormalModel
    {
        private string _code;
        private string _name;
        private string _opendate;
        private string _duedate;
        private string _note;
        private bool _global;
        private int _status;
        private int _type;
        private int _lv;//报价的优先级，相同匹配的条件，优先级越高（数值越高），则越优先取价


        public virtual string Code
        {
            get { return _code; }
            set
            {
                if (_code == value)
                    return;
                _code = value;
                if (!PropertyUpdated.Contains("Code"))
                    PropertyUpdated.Add("Code");
            }
        }
        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;
                _name = value;
                if (!PropertyUpdated.Contains("Name"))
                    PropertyUpdated.Add("Name");
            }
        }
        public virtual string OpenDate
        {
            get { return _opendate; }
            set
            {
                if (_opendate == value)
                    return;
                _opendate = value;
                if (!PropertyUpdated.Contains("OpenDate"))
                    PropertyUpdated.Add("OpenDate");
            }
        }

        public virtual string DueDate
        {
            get { return _duedate; }
            set
            {
                if (_duedate == value)
                    return;
                _duedate = value;
                if (!PropertyUpdated.Contains("DueDate"))
                    PropertyUpdated.Add("DueDate");
            }
        }
        public virtual string Note
        {
            get { return _note; }
            set
            {
                if (_note == value)
                    return;
                _note = value;
                if (!PropertyUpdated.Contains("Note"))
                    PropertyUpdated.Add("Note");
            }
        }
        public virtual int Status
        {
            get { return _status; }
            set
            {
                if (_status == value)
                    return;
                _status = value;
                if (!PropertyUpdated.Contains("Status"))
                    PropertyUpdated.Add("Status");
            }
        }
        public virtual int Type
        {
            //1=一般报价；2=临时报价；
            get { return _type; }
            set
            {
                if (_type == value)
                    return;
                _type = value;
                if (!PropertyUpdated.Contains("Type"))
                    PropertyUpdated.Add("Type");
            }
        }
        public virtual int Lv
        {
            //本报价的优先级，数值越大优先级越高
            get { return _lv; }
            set
            {
                if (_lv == value)
                    return;
                _lv = value;
                if (!PropertyUpdated.Contains("Lv"))
                    PropertyUpdated.Add("Lv");
            }
        }

        public virtual bool Global
        {
            get { return _global; }
            set
            {
                if (_global == value)
                    return;
                _global = value;
                if (!PropertyUpdated.Contains("Global"))
                    PropertyUpdated.Add("Global");
            }
        }
    }
}
